#include "../Include/RedisFactory.h"
#include "../Include/MasterSlaveRedis.h"

IRedis* CRedisFactory::Create(const SRedisInfo& redisInfo)
{
    int n = redisInfo.vecRedisAddr.size();
    assert(n > 0);
    if (n == 1)
    {
        return new CMasterSlaveRedis();
    }
    else
    {
        return new CClusterRedis();
    }
}
